package com.nfIt.dao.Impl;

import com.nfIt.DbUtils.Dbutil;
import com.nfIt.SqlRunner;
import com.nfIt.User;
import com.nfIt.dao.UserDao;

import java.sql.Connection;
import java.util.List;

/**
 * ClossName:UserDaoImpl
 * Pakage:com.nfIt.dao.Impl
 * Description
 *
 * @Author L
 * @Create 2024/4/25 15:20
 * @Version 2023.1.3
 */
public class UserDaoImpl implements UserDao {
    @Override
    public List<User> selectAllUser() {

        String sql = "select * from User";

        Connection connection = Dbutil.getConnection();

        SqlRunner sqlRunner = new SqlRunner(connection);

        List<User> list = sqlRunner.query(User.class,sql);

        return list;
    }
}
